/*-
 * Copyright (c) 2006, 2007 FTS Team
 *
 * Redistribution and use in source and binary forms, with or without
 * modification, are permitted provided that the following conditions
 * are met:
 * 1. Redistributions of source code must retain the above copyright
 *    notice, this list of conditions and the following disclaimer.
 * 2. Redistributions in binary form must reproduce the above copyright
 *    notice, this list of conditions and the following disclaimer in the
 *    documentation and/or other materials provided with the distribution.
 * 4. Neither the name of the FTS Team nor the names of its contributors
 *    may be used to endorse or promote products derived from this software
 *    without specific prior written permission.
 *
 * THIS SOFTWARE IS PROVIDED BY THE REGENTS AND CONTRIBUTORS ``AS IS'' AND
 * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
 * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
 * ARE DISCLAIMED.  IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE
 * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
 * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
 * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
 * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
 * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
 * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
 * SUCH DAMAGE.
 *
 *      DataDumper
 *
 * $FTS$
 */
#ifndef _DATA_DUMPER_HPP__
#define _DATA_DUMPER_HPP__ 1

/**
  @file DataDumper.hpp
  @brief Generic data dumper
*/
#include <Types.h>

namespace FTSS // FullTextSearchSystem
{

/**
  @class DataDumper DataDumper.hpp <DataDumper.hpp>
  @brief Generic data dumper
*/
class DataDumper
{
public:
	/** @brief A Destructor */
	virtual ~DataDumper() throw() { ;; }

	/**
	  @brief Start dump procudure
	  @param iObjectType - type of object
	  @param szObjectName - printable object name
	  @return 0 - if success, -1 - if error
	*/
	virtual INT_32 StartDump(const INT_32 & iObjectType, CCHAR_P szObjectName) throw() = 0;

	/**
	  @brief End dump procudure
	  @return 0 - if success, -1 - if error
	*/
	virtual INT_32 EndDump() = 0;

	/**
	  @brief Dump procudure
	  @param vData - data to restore
	  @param iDataLength - data size
	  @return 0 - if success, -1 - if error
	*/
	virtual INT_32 Dump(const void * vData, const INT_32 & iDataLength) throw() = 0;

	/**
	  @brief Start restore procudure
	  @param iObjectType - type of object
	  @param szObjectName - printable object name
	  @return 0 - if success, -1 - if error
	*/
	virtual INT_32 StartRestore(const INT_32 & iObjectType, CCHAR_P szObjectName) throw() = 0;

	/**
	  @brief End restore procudure
	  @return 0 - if success, -1 - if error
	*/
	virtual INT_32 EndRestore() throw() = 0;

	/**
	  @brief Restore procudure
	  @param vData - data to restore
	  @param iDataLength - data size
	  @return 0 - if success, -1 - if error
	*/
	virtual INT_32 Restore(void * vData, const INT_32 & iDataLength) throw() = 0;
};

} // namespace FTSS
#endif // _DATA_DUMPER_HPP__
// End.
